package org.jhulk.tests;

import org.jhulk.states.GameCache;
import org.jhulk.states.LoadState;
import org.jhulk.states.PlacementState;
import org.jhulk.states.PlayState;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class StateBasedGameTest extends StateBasedGame {

	private GameCache cache = new GameCache();
	
    public StateBasedGameTest(){
		super("Game state test");
	}
    
	@Override
	public void initStatesList(GameContainer container) 
		throws SlickException 
	{
    	this.addState(new LoadState(cache));
		this.addState(new PlacementState(cache));
		this.addState(new PlayState(cache));
	}

	public static void main(String[] args)
    {
        try {
            AppGameContainer app = new AppGameContainer(new StateBasedGameTest());
            app.setDisplayMode(800, 600, false);
            app.start();
        } catch (SlickException e) {
            e.printStackTrace();
        }
    }
}
